static const formatNumber = (n: number) => {
  return "$" + n.toFixed(2);
}

static function formatNumber2(n: number) {
  return "$" + n.toFixed(2);
}
<price value=1 format=formatNumber/>
<price value=1.1111 format=formatNumber2/>
